Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate booststrap-dht with cmake #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

davidchappelle
Copy link

This will make integration for those using cmake much easier. I also fixed up a bunch of compiler warnings about singed/unsigned comparisons.

@arvidn
Copy link
Contributor

arvidn commented Jun 16, 2015

(sorry for taking so long to respond). Is there a compelling reason to add a dependency on libtorrent just for that one file?
my long term plan/hope is to separate the bdecode portion out from libtorrent, and then it could be a submodule instead.

@davidchappelle
Copy link
Author

Can you be more specific? I am not seeing what your comment is applying to.


set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS}")

find_package(LibTorrentRasterbar REQUIRED)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this adds a dependency on libtorrent, doesn't it?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes I see. I'll fix that up.

On Fri, Jul 10, 2015 at 5:47 PM, Arvid Norberg [email protected]
wrote:

In CMakeLists.txt
#5 (comment):

@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.8)
+project(bootstrap-dht)
+
+set(CMAKE_MODULE_PATH

  • ${CMAKE_MODULE_PATH}
  • ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/)

+set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS}")
+
+find_package(LibTorrentRasterbar REQUIRED)

this adds a dependency on libtorrent, doesn't it?


Reply to this email directly or view it on GitHub
https://github.com/bittorrent/bootstrap-dht/pull/5/files#r34399336.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I pushed a fix.

On Fri, Jul 10, 2015 at 6:33 PM, David Chappelle [email protected] wrote:

Ah yes I see. I'll fix that up.

On Fri, Jul 10, 2015 at 5:47 PM, Arvid Norberg [email protected]
wrote:

In CMakeLists.txt
#5 (comment)
:

@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 2.8)
+project(bootstrap-dht)
+
+set(CMAKE_MODULE_PATH

  • ${CMAKE_MODULE_PATH}
  • ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules/)

+set(CMAKE_CXX_FLAGS "-std=c++11 -Wall -Werror ${CMAKE_CXX_FLAGS}")
+
+find_package(LibTorrentRasterbar REQUIRED)

this adds a dependency on libtorrent, doesn't it?


Reply to this email directly or view it on GitHub
https://github.com/bittorrent/bootstrap-dht/pull/5/files#r34399336.

@@ -0,0 +1,59 @@
# - Try to find libtorrent-rasterbar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole file still has lots of references to libtorrent. There is no dependency on libtorrent, right?
Oh, I just realized this is the libtorrent cmake module. it seems odd that this file would be necessary.

Although Jam may be the preferred build tool in many cases, cmake is also
a very commonly used build tool. Adding cmake support simplifies integration
of bootstrap-dht for those environments.
The common pattern with cmake from the top level directory is:

    mkdir build
    cd build
    cmake ../

This is typically referred to as an out of source build. This leaves
your project tree intact and does not pollute it with build output
files. As a result, it makes sense to exclude this directory so that
it doesn't accidentally get checked in to git.
@davidchappelle
Copy link
Author

Thanks for the feedback Arvid. I think I have addressed all of the review comments now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants